#ifndef __rem_h
#define __rem_h

#define    p_rem    P0_0
#define  c_t1_value_15ms  120// 36862//73725 //  
#define  c_t1_value_12ms    96///29490//58960 //  
#define  c_t1_value_3ms    24// //7372 //14745 //   
#define  c_t1_value_1313us 11// //3226 //6453  //  

#define  bit15          0x8000
#ifdef __rem_c

uint16_t    data d_rem_addr;
uint16_t data d_rem_data;
uint8_t data d_th1_tmp;
uint8_t data d_rem_bit_count;
uint8_t data d_rem_step;
uint8_t data d_rem_key;
bit data lastP_rem;
uint8_t remTimer;
#else
extern uint8_t remTimer;
extern bit data lastP_rem;
extern uint16_t  data   d_rem_addr;
extern uint16_t data d_rem_data;
extern uint8_t data d_th1_tmp;
extern uint8_t data d_rem_bit_count;
extern uint8_t data d_rem_step;
extern uint8_t data d_rem_key;

#endif
void rem_invalid(void);
void remControl();
void  remTimeControl();
#endif
